package com.lotto.manager.admin.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.lotto.manager.admin.dao.OddsMapper;
import com.lotto.manager.admin.entity.db.Odds;
import com.lotto.manager.admin.service.OddsService;
import com.lotto.manager.admin.system.SystemData;

public class OddsServiceImpl implements OddsService {
	
	@Autowired
	private OddsMapper oddsMapper;
	
	@Override
	public void initOdds() {
		List<Odds> list = oddsMapper.selectList(null);
		if(null != list){
			for(Odds odds : list){
				SystemData.addOdds(odds.getItemId(), odds);
			}
		}
	}

	@Override
	public Odds findOddsByItemid(Integer item) {
		return SystemData.findOddsByItemid(item);
	}
	
	
	
}